package view;

import controller.IFormController;
import model.User;

public class UserFormView implements IFormView<User>{

	protected IFormController<User> controller;
	
	@Override
	public void render(User object) {
		System.out.println("==================================");
		System.out.println("*** Usuario ID " + object.getId() + " ***");
		System.out.println("==================================");
		System.out.println("- Username: " + object.getUserName());
		System.out.println("- Password: " + object.getPassword());
		System.out.println("==================================");
	}

	@Override
	public void render(String string) {
		System.out.println("=======================");
		System.out.println(string);
		System.out.println("=======================");
	}

	@Override
	public void submitForm(String... values) {
		this.controller.submitRequest(values);
	}


	@Override
	public void search(String value) {
		this.controller.searchRequest(value);
	}
	
	public IFormController<User> getController() {
		return controller;
	}
	
	public void setController(IFormController<User> controller) {
		this.controller = controller;
	}
}
